﻿using BCCommon;
using BCCommon.OAEnums;
using BCDto.MySql.Admin;
using BCDto.OA.Attendance.AttendanceCheckInRecord;
using System;
using System.Collections.Generic;

namespace BCService.OA.Attendance.AttendanceCheckInRecord
{
    /// <summary>
    /// 考勤打卡信息服务
    /// </summary>
    public interface IAttendanceCheckInRecordService
    {
        /// <summary>
        /// 新创建一条打卡记录信息
        /// </summary>
        /// <param name="admin">打卡员工信息</param>
        /// <param name="dto">打卡信息</param>
        /// <returns></returns>

        AttendanceCheckInRecordDto CreateAttendanceCheckInRecord(AdminDto admin, AttendanceCheckInRecordRequestDto dto);
        /// <summary>
        /// 更新打卡信息
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="checkInRecordId"></param>
        /// <param name="dto"></param>
        /// <returns></returns>
        AttendanceCheckInRecordDto UpdateAttendanceCheckInRecord(AdminDto admin, long checkInRecordId, AttendanceCheckInRecordRequestDto dto);
        /// <summary>
        /// 获取当前员工的打卡状态列表
        /// </summary>
        /// <param name="admin">当前员工</param>
        /// <param name="date">日期</param>
        /// <returns></returns>
        List<AttendanceCheckInRecordDto> GetCurrentCheckInRecordList(AdminDto admin, DateTime date);

        /// <summary>
        /// 获取当前员工的打卡以及流水列表
        /// </summary>
        /// <param name="admin">当前员工</param>
        /// <param name="date">日期</param>
        /// <returns></returns>
        List<AttendanceCheckInRecordViewDto> GetCheckInRecordWithFlows(AdminDto admin, DateTime date);

        /// <summary>
        /// 分页获取打卡记录信息
        /// </summary>
        /// <param name="adminDto">当前登录管理员</param>
        /// <param name="pageIndex">分页页码</param>
        /// <param name="pageSize">分页页数</param>
        /// <param name="ascending">是否升序</param>
        /// <param name="sourceType">来源类型</param>
        /// <param name="status">打卡状态</param>
        /// <param name="checkInType">打卡方式</param>
        /// <param name="startTime">打卡开始时间</param>
        /// <param name="endTime">打卡结束时间</param>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        PageableList<AttendanceCheckInRecordDto> GetList(AdminDto adminDto, int pageIndex, int pageSize, bool? ascending, SourceType? sourceType, CheckInStatus? status, CheckInType? checkInType, DateTime? startTime = null, DateTime? endTime = null, int? departmentId = null);
    }
}
